package com.translate.web.service.impl;

import com.translate.web.dao.TextConfMapper;
import com.dao.base.IBaseMapper;
import com.translate.entity.TextConf;
import com.translate.web.service.ITextConfService;

import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class TextConfServiceImpl extends BaseTranslateServiceImpl<TextConf> implements ITextConfService {
	public TextConfServiceImpl(TextConfMapper mapper) {
		super(mapper);
	}

	protected void insertPropteris(TextConf data) {
		long time = System.currentTimeMillis() / 1000;
		data.setCreateTime(time);
		data.setUpdateTime(time);
	}
	

	protected void updatePropteris(TextConf data) {
		data.setUpdateTime(System.currentTimeMillis() / 1000);
	}

	protected Class<TextConf> getEntityClass() {
		return TextConf.class;
	}

	@Override
	protected TextConf getEntityInstance() {
		// TODO Auto-generated method stub
		return new TextConf();
	}

	@Override
	public List<TextConf> getListByType(int type) {

		TextConfMapper baseMapper = this.getBaseMapper();
		
		return baseMapper.getListByType(type);
	}
}